An Ethernet tree (E-Tree) is an Ethernet virtual circuit (EVC) service defined by the metro Ethernet forum (MEF). The E-Tree has the following features:
A root node and a leaf node are in a one-to-multiple relationship, and multiple root nodes may exist;
a root node may send an Ethernet frame to any other root node and any leaf node, and a leaf node may send an Ethernet frame to any root node; and
a leaf node cannot directly connect to and must be isolated from another leaf node.
A virtual private local area network service (VPLS) is a technology which uses wide area network (WAN) architecture to virtualize an Ethernet local area network. The VPLS is capable of providing a multipoint-to-multipoint connection, similar to that of a local area network (LAN), on a multi-protocol label switching (MPLS) network, which makes it convenient for users to simultaneously access the MPLS network from multiple geographically scattered points and access each other, as if these points were directly connected to a LAN. Because currently core networks mainly use an Internet Protocol (IP)/MPLS technology, requirements of providing a virtual Ethernet service through the VPLS is increasing and it has already been widely deployed.
An existing technology for providing the E-Tree by using the VPLS is to use different virtual local area networks (VLAN) to identify whether Ethernet frames come from a root node or a leaf node: On a provider edge (PE) device, a corresponding root VLAN identifier or leaf VLAN identifier is added according to whether an E-Tree access port is a root or leaf, and then a packet marked with the root VLAN identifier or leaf VLAN identifier is transferred through a pseudo wire (PW) to a peer PE; and on the peer PE, the VLAN identifier carried in the packet is converted into a local VLAN identifier, and then corresponding forwarding or filtering is performed; for example, a frame from a root VLAN is forwarded on a leaf port, a frame from a leaf VLAN is filtered on the leaf port, and the like.
For higher network scalability, each PE may generally use an independent VLAN space of its own, and a PE with a unidirectional PW egress performs appropriate VLAN translation. For example, there is a bidirectional PW between a PE 1 and a PE 2, that is, a PW 1 in a forward direction and a PW 2 in a reverse direction are connected; E-Tree service types on the PE 1 are identified as Root1 VLAN and Leaf1 VLAN; and E-Tree service types on the PE 2 are identified as Root2 VLAN and Leaf2 VLAN. The value of the Root1 VLAN may be different from the value of the Root2 VLAN, and the value of the Leaf1 VLAN may be different from the value of the Leaf2 VLAN. Therefore, an E-Tree service packet borne on the PW 1 in the forward direction from the PE 1 to the PE 2 carries Root1 VLAN or Leaf1 VLAN, which is converted on the egress PE 2 into Root2 VLAN or Leaf2 VLAN, respectively; and an E-Tree service packet borne on the PW 2 in the reverse direction from the PE 2 to the PE 1 carries Root2 VLAN or Leaf2 VLAN, which is converted on the egress PE 1 into Root1 VLAN or Leaf1 VLAN, respectively. In this way, four different VLAN identifiers appear on the bidirectional PW, bringing difficulties in E-Tree service maintenance and detection.